package models

// MaDevErrorLog [...] 创单错误提示表，用于后台查看
type MaDevErrorLog struct {
	ID        string `gorm:"autoIncrement:true;primaryKey;column:id;type:int;size:64;unsigned;not null" json:"id"`
	Level     int    `gorm:"column:level;type:int;size:64" json:"level"`
	Name      string `gorm:"column:name;type:string;size:50" json:"name"`
	Msg       string `gorm:"column:msg;type:string;size:1000;default:null"  json:"msg"`
	CreatedAt int64  `gorm:"column:created_at;autoCreateTime;type:int;size:64;comment:创建时间" json:"created_at"`
}

// TableName get sql table name.获取数据库表名
func (m MaDevErrorLog) TableName() string {
	return "ma_dev_error_log"
}

// 模式自动注册
func init() {
	Models = append(Models, &MaDevErrorLog{})
}
